import React from 'react';
import {  useNavigate } from 'react-router-dom';
import { Button } from 'antd';
const Home: React.FC = () => {
    const nav = useNavigate()
    function handle() {
        nav('/login')
    }
    return (
        <div className="min-h-screen flex items-center justify-center bg-gray-50 p-8">
            <div className="bg-white p-8 rounded-lg shadow-md w-full max-w-md text-center">
                <h2 className="text-2xl font-bold text-gray-800 mb-6 ">欢迎</h2>
                <div className="space-y-4">
                    <Button onClick={handle} type="primary" className="w-full">
                        登陆
                    </Button>
                    <Button type="primary" danger className="w-full" onClick={() => nav('/test')}>TO DO LIST</Button>
                    <Button type="primary" onClick={() => nav('/form')} className="w-full">
                        计算成绩
                    </Button>
                </div>
            </div>
        </div>
    );
}
export default Home;